package day06;

import java.util.Scanner;

public class Ryshuzufan {
    public static void main(String[] args) {
        fanshu();
    }
    public static void fanshu(){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数组中元素个数");
        int n=sc.nextInt();
        int arr[] = new int[n];
        int sum=0;
        System.out.println("请输入数组中元素");
        for (int i = 0; i < arr.length; i++) {
            arr[i]=sc.nextInt();
        }
        int end=arr.length-1;
        for (int i=0;i<=(arr.length-1)/2;i++,end--){
            int temp=arr[i];
            arr[i]=arr[end];
            arr[end]=temp;
        }
        for (int i = 0; i <= arr.length-1; i++) {
            System.out.println(arr[i]);
        }
    }

}
